package com.chu.service.impl;

import com.chu.entity.OrgRole;
import com.chu.enums.StateEnum;
import com.chu.mapper.OrgRoleMapper;
import com.chu.service.OrgRoleService;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class OrgRoleServiceImpl implements OrgRoleService {
    @Autowired
    private OrgRoleMapper orgRoleMapper;

    @Override
    public PageInfo<OrgRole> findAllOrgRole(int page, int size, String name, String deptname, String state) {
        PageHelper.startPage(page,size);
        Map map = new HashMap();
        map.put("name",name);
        map.put("deptname",deptname);
        map.put("state", state);
        List<OrgRole> list = orgRoleMapper.findAllOrgRole(map);
        PageInfo<OrgRole> pageInfo = new PageInfo<>(list);
        return pageInfo;
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return 0;
    }

    @Override
    public int insert(OrgRole record) {
        return 0;
    }

    @Override
    public int insertSelective(OrgRole record) {
        return 0;
    }

    @Override
    public OrgRole selectByPrimaryKey(Integer id) {
        return null;
    }

    @Override
    public int updateByPrimaryKeySelective(OrgRole record) {
        return 0;
    }

    @Override
    public int updateByPrimaryKey(OrgRole record) {
        return 0;
    }
}
